<head>
	<title>
	</title>
</head>
<body>
<h1>
Aro View: 
	<?php
	 if(strcmp($aro['Aro']['model'], 'Position' ) == 0){
		foreach($positions as $position){
			if(strcmp($aro['Aro']['foreign_key'], $position['Position']['id']) == 0)
			{
				echo $position['Position']['position'];
				break;
			}
		}
	} 
	else{
		foreach($members as $member){
			if(strcmp($aro['Aro']['foreign_key'], $member['UnionMember']['id']) == 0)
			{					
				echo $member['UnionMember']['name'];
				break;
			}
		}
	} 
	?>
</h1>
	<table>
		<tr>
			<th>Aco Id</th>
			<th>Aco Alias</th>
			<th>Actions</th>
			<th>Allowed</th>
		</tr>
		<?php
		$i = 0;
		foreach($acos1 as $aco1){
			
		?>
			<tr>
				<td><?php echo $aco1['Aco']['id']?></td>
				<td><?php echo $path[$i]; ?></td>
				<td>
				<?php
					 if(strcmp($aro['Aro']['model'], 'Position' ) == 0){
						 foreach($positions as $position){
							if(strcmp($aro['Aro']['foreign_key'], $position['Position']['id']) == 0)
							{
								//echo $i;
								echo $html->link('Allow', array('controller' => 'Positions', 
																'action' => 'allow',
																 $position['Position']['id'],
																 $path[$i]));
								
								echo " | ";								
								echo $html->link('Deny', array('controller' => 'Positions', 
																'action' => 'deny',
																 $position['Position']['id'],
																 $path[$i]));
								break;
							}
						}
					}  
					else{
						foreach($members as $member){
							if(strcmp($aro['Aro']['foreign_key'], $member['UnionMember']['id']) == 0)
							{					
								echo $html->link('Allow', array('controller' => 'UnionMembers', 
																'action' => 'allow',
																 $member['UnionMember']['id']));
								echo " | ";
								echo $html->link('Deny', array('controller' => 'UnionMembers', 
																'action' => 'deny',
																 $member['UnionMember']['id']));
								break;
							}
						}
					}
					$i++; 
				?> 
				</td>
				<td>
				<?php
					if($aco1['ArosAcos']['_create'] == 1)
						echo 'True';
					else
						echo 'False';
				?>
				</td>
			</tr>
		<?php 
		} 
		?>
	</table>
</body>